package com.tansun.easycare.rule.ruleflow.entity;

import org.hibernate.validator.constraints.Length;

import com.tansun.easycare.rule.common.entity.RuleBaseEntity;
import com.tansun.easycare.rule.ruleflow.model.RuleFlowItem;

/**
 * 规则流节点条件信息Entity
 *
 * @author lph
 * @version 2017-04-17
 */
public class RuleFlowConditions extends RuleBaseEntity<RuleFlowConditions> {

    private static final long serialVersionUID = 1L;
    private String manageId;        // relation_code
    private String projectCode;        // project_code
    private String version;        // version
    private String className;        // class_name
    private String namecn;        // name_cn
    private String nameen;        // name_en
    private String symbol;        // symbol
    private String leftOpt;        // left_opt
    private String controlValues;        // control_values
    private String rightOpt;        // right_opt
    private String formulaLabel;        // formula_label
    private String formula;        // formula
    private String dataType;        // datat_ype
    private String defaultValue;        // default_value
    private String domain;        // domain
    private String position;        // position
    private String isderives;        // isderives
    private int seq;

    public RuleFlowConditions() {
        super();
    }

    public RuleFlowConditions(RuleFlowItem forkItem) {
        super();
        this.className = forkItem.getClassName();
        this.namecn = forkItem.getNameCN();
        this.nameen = forkItem.getNameEN();
        this.symbol = forkItem.getSymbol();
        this.position = forkItem.getPosition();
        this.isderives = forkItem.getIsDerives();
        this.controlValues = forkItem.getControlValue();
        this.leftOpt = forkItem.getLeftOpt();
        this.rightOpt = forkItem.getRightOpt();
        this.dataType = forkItem.getDataType();
        this.defaultValue = forkItem.getDefaultValue();
    }

    public RuleFlowConditions(String id) {
        super(id);
    }

    public String getManageId() {
        return manageId;
    }

    public void setManageId(String manageId) {
        this.manageId = manageId;
    }

    @Length(min = 1, max = 50, message = "project_code长度必须介于 1 和 50 之间")
    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    @Length(min = 0, max = 10, message = "version长度必须介于 0 和 10 之间")
    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    @Length(min = 1, max = 50, message = "class_name长度必须介于 1 和 50 之间")
    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Length(min = 1, max = 50, message = "name_cn长度必须介于 1 和 50 之间")
    public String getNamecn() {
        return namecn;
    }

    public void setNameCn(String namecn) {
        this.namecn = namecn;
    }

    @Length(min = 1, max = 50, message = "name_en长度必须介于 1 和 50 之间")
    public String getNameen() {
        return nameen;
    }

    public void setNameen(String nameen) {
        this.nameen = nameen;
    }

    @Length(min = 1, max = 10, message = "symbol长度必须介于 1 和 10 之间")
    public String getSymbol() {
        return symbol;
    }

    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    @Length(min = 1, max = 50, message = "left_opt长度必须介于 1 和 50 之间")
    public String getLeftOpt() {
        return leftOpt;
    }

    public void setLeftOpt(String leftOpt) {
        this.leftOpt = leftOpt;
    }

    @Length(min = 1, max = 100, message = "control_values长度必须介于 1 和 100 之间")
    public String getControlValues() {
        return controlValues;
    }

    public void setControlValues(String controlValues) {
        this.controlValues = controlValues;
    }

    @Length(min = 1, max = 50, message = "right_opt长度必须介于 1 和 50 之间")
    public String getRightOpt() {
        return rightOpt;
    }

    public void setRightOpt(String rightOpt) {
        this.rightOpt = rightOpt;
    }

    @Length(min = 1, max = 200, message = "formula_label长度必须介于 1 和 200 之间")
    public String getFormulaLabel() {
        return formulaLabel;
    }

    public void setFormulaLabel(String formulaLabel) {
        this.formulaLabel = formulaLabel;
    }

    @Length(min = 1, max = 200, message = "formula长度必须介于 1 和 200 之间")
    public String getFormula() {
        return formula;
    }

    public void setFormula(String formula) {
        this.formula = formula;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    @Length(min = 1, max = 50, message = "default_value长度必须介于 1 和 50 之间")
    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    @Length(min = 1, max = 50, message = "domain长度必须介于 1 和 50 之间")
    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    @Length(min = 1, max = 11, message = "position长度必须介于 1 和 11 之间")
    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    @Length(min = 1, max = 10, message = "isderives长度必须介于 1 和 10 之间")
    public String getIsderives() {
        return isderives;
    }

    public void setIsderives(String isderives) {
        this.isderives = isderives;
    }

    public int getSeq() {
        return seq;
    }

    public void setSeq(int seq) {
        this.seq = seq;
    }

}